package com.xike.micromemberserver.service.impl;

import com.xike.micromemberserver.dao.ChapterServiceMapper;
import com.xike.micromemberserver.entity.ChapterEntity;
import com.xike.micromemberserver.service.IChapterService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author hongbin
 * @date 2021-04-28 20:05
 * Description：
 */
@Service
public class ChapterServiceImpl implements IChapterService {
    @Resource
    private ChapterServiceMapper chapterServiceMapper;

    @Override
    public List<ChapterEntity> selectAll(int bookId) {
        return chapterServiceMapper.selectAll(bookId);
    }

    @Override
    public int insert(ChapterEntity entity) {
        return chapterServiceMapper.insert(entity);
    }

    @Override
    public int update(ChapterEntity entity) {
        return chapterServiceMapper.update(entity);
    }

    @Override
    public int delete(int id) {
        return chapterServiceMapper.delete(id);
    }

    @Override
    public ChapterEntity selectOneByNum(ChapterEntity currentChapterEntity) {
        return chapterServiceMapper.selectOneByNum(currentChapterEntity);
    }


}
